-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop request and response from Application and bootstrap event #162
Open
Xerkus
wants to merge
13
commits into
laminas:4.0.x
Choose a base branch
from
Xerkus:feature/drop-bootstrap-request-response
base: 4.0.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Drop request and response from Application and bootstrap event #162
Xerkus
wants to merge
13
commits into
laminas:4.0.x
from
Xerkus:feature/drop-bootstrap-request-response
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ApplicationInterface was never properly utilized and some parts of the MVC application are implicitly depending on Laminas\Mvc\Application. It is not type safe and with the general direction towards dependency injection with container-exists-first approach there is hardly any value in keeping the interface. Signed-off-by: Aleksei Khudiakov <[email protected]>
Signed-off-by: Aleksei Khudiakov <[email protected]>
Use double-dispatch approach to ensure default listeners are registered. Signed-off-by: Aleksei Khudiakov <[email protected]>
… Application. Signed-off-by: Aleksei Khudiakov <[email protected]>
Signed-off-by: Aleksei Khudiakov <[email protected]>
Signed-off-by: Aleksei Khudiakov <[email protected]>
Deprecate `Application::getServiceManager()` to be removed in next major. Remove usage of `Application::getServiceManager()` in ViewManager listener. Signed-off-by: Aleksei Khudiakov <[email protected]>
Signed-off-by: Aleksei Khudiakov <[email protected]>
Signed-off-by: Aleksei Khudiakov <[email protected]>
Signed-off-by: Aleksei Khudiakov <[email protected]>
Signed-off-by: Aleksei Khudiakov <[email protected]>
Signed-off-by: Aleksei Khudiakov <[email protected]>
…ype safety Signed-off-by: Aleksei Khudiakov <[email protected]>
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Current application setup relies on shared request and response objects in Application, in MvcEvent and in Container.
Ultimately MvcEvent would become the only source of truth (besides instances passed around as arguments).
This PR changes Application to drop request and response properties and deprecates accessor methods for them. Deprecated accessor methods now proxy to MvcEvent instance.
Request and response instances are dropped from bootstrap event.
New Application event
prepare
is introduced to allow request dependent preparation logic that some users have in bootstrap to be invoked at a proper place.prepare
event is part ofApplication::run()
as it is the only reasonable place where http request can be available.Application switched to closure based request/response factories. Those are placeholders as factory classes would need to be introduced in laminas-http.
Request and response would be dropped from container in a separate PR.
This PR depends on and includes commits from #161
Psalm issues which are not directly related intentionally left unfixed to be handled in a separate PR.
Documentation for the changes is to be done via separate PR. See #58